#!/bin/bash

# open directory (or parent directory) in KDE konqueror
# usage: scm "<file|directory>"

directory=$1
# remove double quotes
directory=$(echo $directory | sed s!\"!!g)
# if it's a file, get parent directory
[ -f $directory ] && directory=$(dirname $directory)
kfmclient exec file:$directory
